﻿using System;
using System.Collections.Generic;
using System.Text;
using EnCor.ModuleLoader;
using EnCor.Security;

namespace EnCor
{
    public abstract class BizService : MarshalByRefObject
    {
        private string _Name;
        private string _ServiceId;

        protected IUserInfo User
        {
            get
            {
                return SecurityContext.Current.UserInfo;
            }
        }

        internal protected virtual void Start()
        { 
            
        }

        internal protected virtual void Stop()
        { 
            
        }

        public string Name
        {
            get
            {
                return _Name;
            }
            internal set
            {
                _Name = value;
            }
        }

        public string ServiceId
        {
            get
            {
                return _ServiceId;
            }
            internal set
            {
                _ServiceId = value;
            }
        }
    }
}
